package cn.z2huo.knowledge.collection.iterator;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * <p>
 *
 * @author z2huo
 */
public class ArrayListIteratorTest {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();

        list.add("a");
        list.add("b");
        list.add("c");

        Iterator<String> iterator = list.iterator();

        while (iterator.hasNext()) {
            String element = iterator.next();
            System.out.println(element);
        }
    }
}
